﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Castle.ActiveRecord.Queries;
using CQIE.OVS.Model;

namespace CQIE.OVS.DAL
{
     public class ActivityDAL:DALBase<Activity>
    {
        public IList<Campaigner> GetCampaigners(Activity AId)
        {
            SimpleQuery query = new SimpleQuery(
                typeof(Campaigner),
                @"from Campaigner Where Activity =? and IsAlive > 0",
                new object[]
                {
                    AId
                });

            return (IList<Campaigner>)ExecuteQuery(query);

        }
    }
}
